package com.hspedu.hspliving.commodity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hspedu.common.utils.PageUtils;
import com.hspedu.hspliving.commodity.entity.AttrAttrgroupRelationEntity;
import com.hspedu.hspliving.commodity.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性表
 *
 * @author hsp
 * @email hsp@gmail.com
 * @date 2025-07-27 17:00:00
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryBasePage(Map<String, Object> params,Long categoryId);

    PageUtils querySalePage(Map<String, Object> params,Long categoryId);

    void saveAttrAndRelation(AttrEntity attr);

    void removeAndRelation(Long[] attrIds);

    List<AttrEntity> getAttrByAttrGroupId(Long attrgroupId);

    void deleteAttrRelationBatch(List<AttrAttrgroupRelationEntity> attrAttrgroupRelationEntities);

    PageUtils getAllowRelationAttr(Map<String, Object> params, Long attrgroupId);
}

